//
//  ParentModel.m
//  FuncFanc
//
//  Created by careate-hubing on 2020/12/16.
//  Copyright © 2020 huhu. All rights reserved.
//

#import "ParentModel.h"

@implementation ParentModel
/**
 * 排除异常的key
 */
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    NSLog(@"%@ 类里面异常的 %@", NSStringFromClass(self.class), key);
}

/**
 * 将 NSNumber类型 转成NSString
 */
- (void)setValue:(id)value forKey:(NSString *)key
{
    if([value isKindOfClass:[NSNumber class]])
    {
        value = [value stringValue];
    }
    if ([value isKindOfClass:[NSNull class]]) {
        value = @"";
    }
    [super setValue:value forKey:key];
}
@end

@implementation UserModel
+(NSString *)getTableName
{
    NSString *deviceID = [[QHCommonTool getDeviceID]stringByReplacingOccurrencesOfString:@"-" withString:@""];
    
    NSString * tableNameString = [NSString stringWithFormat:@"UserModel_%@",deviceID];
    return tableNameString;
}

+(NSString *)getPrimaryKey
{
    return @"idNumber";
}
@end

@implementation CreditCardModel
+(NSString *)getTableName
{
    NSString *deviceID = [[QHCommonTool getDeviceID]stringByReplacingOccurrencesOfString:@"-" withString:@""];
    
    NSString * tableNameString = [NSString stringWithFormat:@"CreditCardModel_%@",deviceID];
    return tableNameString;
}

+(NSString *)getPrimaryKey
{
    return @"idNumber";
}
@end

@implementation BillModel


@end
//@implementation IDCardInfoModel
//
//
//
//@end
@implementation DoctorPhotoModel



@end
